home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / music / 5mods_1.arj / SPOT023.MOD < prev    next >
Text File  |  1994-01-29  |  5KB  |  190 lines

  1. Spotnick #1 @5497
  2. Thu Jan 27 08:40:43 1994
  3. 0R: net34: @2050 (via @1040) [04:08 01/29/94]
  4. 0R: net33: @1040 (via @1046) [03:44 01/29/94]
  5. 0R: net33: @1046 (via @5497) [08:47 01/21/94]
  6. 0R: net33: @5497 [08:43 01/27/94]
  7. ╓────────────────────────────────────────────────────────────────────────────╖
  8. ║ Mod Name      : SPOT023.MOD          Mod Author: Spotnick 1@5497 WWIVnet   ║
  9. ║ Difficulty    : █▒▒▒▒▒                                    1@5497 WWIVlink  ║█
  10. ║ WWIV Version  : 4.23                                      1@5497 IceNet    ║█
  11. ║ Mod Date      : 01/27/94                                                   ║█
  12. ║ Files Affected: XFER.C / XFEROVL.C / BATCH.C / VARDEC.H                    ║█
  13. ║ Description   : Free Files For WWIV v4.23                                  ║█
  14. ╙────────────────────────────────────────────────────────────────────────────╜█
  15.   ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  16.  
  17. Long Description:
  18.  
  19.         This modification will allow to have free files on your system, very
  20. easy to use, very easy to install.
  21.  
  22. Fast Legend: (+) = add, (-) = remove, (*) = modify, (=) = existing
  23.  
  24. Step 1: Load VARDEC.H and do the following change:
  25.  
  26. = #define mask_no_ratio      0x0020
  27. = #define mask_cdrom         0x0040
  28. + #define mask_free          0x0080
  29. = #define mask_extended      0x8000
  30.  
  31.  
  32. Step 2: Load XFER.C now and do the following changes:
  33.  
  34. =    if (strncmp(u.filename,"WWIV4",5)==0)
  35. =      i1=1;
  36. =    else {
  37. *      if (!ratio_ok() && (!(u.mask && mask_free))) {
  38. =        return(-1);
  39. =      }
  40. =    }
  41. =    if (i1) {
  42. =      write_inst(INST_LOC_DOWNLOAD,udir[curdir].subnum,INST_FLAGS_ONLINE);
  43.  
  44.  
  45. Lower...
  46.  
  47. =        bad=1;
  48. =      }
  49. =      if ((syscfg.req_ratio>0.0001)
  50. =        && (ratio()<syscfg.req_ratio)
  51. =        && (!thisuser.exempt & exempt_ratio)
  52. *        && (bad==0)  && (!(u.mask && mask_free))) {
  53. =        ansic(2);
  54. =        outstr(get_string(730));
  55. =        sprintf(s," %-5.3f.  ",ratio());
  56.  
  57. Step 3: Load BATCH.C and do the following change:
  58.  
  59. =  do {
  60. =    tleft(1);
  61. =    if ((syscfg.req_ratio>0.0001) && (ratio()<syscfg.req_ratio))
  62. =      rr=1;
  63. =    if (thisuser.exempt & exempt_ratio)
  64. =      rr=0;
  65. +    if (u.mask && mask_free)
  66. +      rr=0;
  67.  
  68.  
  69. Lower...
  70.  
  71. =        ok=0;
  72. =      thisk=bytes_to_k(batch[i].len);
  73. =      if ((syscfg.req_ratio>0.0001) && (ratio1(addk+thisk)<syscfg.req_ratio) &&
  74. *          (!(thisuser.exempt & exempt_ratio)) && (!(u.mask && mask_free)))
  75. =        ok=0;
  76. =      if (ok) {
  77. =        sh_write(f,s,strlen(s));
  78.  
  79.  
  80. Lower...
  81.  
  82.  
  83.         nl();
  84.         if (!ratio_ok() && (!(u.mask && mask_free)) {
  85.           nl();
  86.           pl(get_string(883));
  87.           nl();
  88.           done=1;
  89.           break;
  90.         }
  91.         nl();
  92.         prt(5,get_string(877));
  93.         had=yn();
  94.  
  95.  
  96. Step 4: Load XFEROVL.C and add the following function at the end of the file
  97.  
  98. void free_file(void)
  99. {
  100.   char s[81],s1[81],s2[81],*ss,s3[81],ch;
  101.   int i,cp,f;
  102.   uploadsrec u;
  103.  
  104.   nl();
  105.   nl();
  106.   prt(2,get_string(829));
  107.   input(s,12);
  108.   if (s[0]==0)
  109.     return;
  110.   if (strchr(s,'.')==NULL)
  111.     strcat(s,".*");
  112.   align(s);
  113.   dliscan();
  114.   nl();
  115.   strcpy(s3,s);
  116.   i=recno(s);
  117.   while (i>0) {
  118.     f=sh_open1(dlfn,O_RDONLY | O_BINARY);
  119.     cp=i;
  120.     SETREC(f,i);
  121.     sh_read(f,(void *)&u,sizeof(uploadsrec));
  122.     f=sh_close(f);
  123.     nl();
  124.     printfileinfo(&u,udir[curdir].subnum);
  125.     nl();
  126.     prt(5,"Make This File Free? ");
  127.     ch=ynq();
  128.     if (ch=='Q')
  129.       break;
  130.     else if (ch=='N') {
  131.       i=nrecno(s3,cp);
  132.           u.mask &= ~mask_free;
  133.       continue;
  134.     }
  135.     u.mask |= mask_free;
  136.     f=sh_open(dlfn,O_RDWR | O_BINARY | O_CREAT, S_IREAD | S_IWRITE);
  137.     SETREC(f,i);
  138.     sh_write(f,(void *)&u,sizeof(uploadsrec));
  139.     f=sh_close(f);
  140.     i=nrecno(s3,cp);
  141.   }
  142. }
  143.  
  144. Step 4: Load BBS.C and change this
  145.  
  146.  
  147.  
  148. =    if (strcmp(s,"/?")==0)
  149. =      printmenu(8);
  150. =
  151. +    if (strcmp(s,"/P")==0)
  152. +      file_free();
  153. +
  154. =    if (strcmp(s,"READIDZ")==0)
  155.  
  156. Step 5: Load XFER.C and add some of these.
  157.  
  158. =  outstr(get_string(750)); pl(u->date);
  159. =  outstr(get_string(751)); pl(u->upby);
  160. =  outstr(get_string(752)); pln(u->numdloads);
  161. +  if (u->mask && mask_extended)
  162. +    outstr("File Status: Free Download");
  163. =  nl();
  164. =  abort=0;
  165.  
  166.  
  167. In function printinfo, change this:
  168.  
  169. =    ansic(fc ? FRAME : 0);
  170. =    osan((okansi() ? "║" : "|"),abort,&next);
  171. +  if (u->mask && mask_extended)
  172. +    sprintf(s1,"Free");
  173. +  else
  174. =    sprintf(s1,"%d",u->numdloads);
  175. =
  176. =    for (i=0; i<4-(int)strlen(s1); i++)
  177. =      s[i]=32;
  178.  
  179. Step 6: Make FCNS and compile! It should be okay! If you find any errors,
  180.         E-Mail me right away! Use /P just like the function //REN in the
  181.         X-Fer section to make some files free.
  182.  
  183.  
  184. Spotnick, SysOp Of Alternative Worlds
  185. Auto-SysOp Validation - Ratio Free On WWIV Stock - 0-30 Days Files
  186. Official WWIV Support Board - Running v4.23
  187. (514)-664-4503 (US Robotics Sportster 14.4k)
  188. Call Here To Get Last Updated French Strings
  189.  
  190.